﻿using LiteBlog.Components.Contracts;
using LiteBlog.Controllers;
using LiteBlog.Controllers.Contracts;
using Moq;
using StructureMap.Configuration.DSL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LiteBlog.IoC
{
    class RegistryForControllerTests : Registry
    {

        internal RegistryForControllerTests()
            : base()
        {
            For<ISettingsComp>().Use(() => Mock.Of<ISettingsComp>());
            For<ICacheComp>().Use(() => Mock.Of<ICacheComp>());
            For<IStatComp>().Use(() => Mock.Of<IStatComp>());
            For<IPageComp>().Use(() => Mock.Of<IPageComp>());
            For<IFeedComp>().Use(() => Mock.Of<IFeedComp>());
            For<IBlogComp>().Use(() => Mock.Of<IBlogComp>());
            For<IPostComp>().Use(() => Mock.Of<IPostComp>());
            For<IPageComp>().Use(() => Mock.Of<IPageComp>());
            For<IAuthorComp>().Use(() => Mock.Of<IAuthorComp>());
            For<IArchiveComp>().Use(() => Mock.Of<IArchiveComp>());
            For<IBackupComp>().Use(() => Mock.Of<IBackupComp>());
            For<ICategoryComp>().Use(() => Mock.Of<ICategoryComp>());
            For<ITagComp>().Use(() => Mock.Of<ITagComp>());
            For<ICommentComp>().Use(() => Mock.Of<ICommentComp>());
            For<IDocumentComp>().Use(() => Mock.Of<IDocumentComp>());
            For<ISiteMapComp>().Use(() => Mock.Of<ISiteMapComp>());

            For<IAuthenticationHelper>().Use(() => Mock.Of<IAuthenticationHelper>());

            For<IAdminController>().Use<AdminController>();
            For<IArchiveController>().Use<ArchiveController>();
            For<IAuthorController>().Use<AuthorController>();
            For<ICategoryController>().Use<CategoryController>();
            For<ICommentController>().Use<CommentController>();
            For<IHomeController>().Use<HomeController>();
            For<IPageController>().Use<PageController>();
            For<IPostController>().Use<PostController>();
            For<ISkinController>().Use<SkinController>();
            For<IScheduleController>().Use<ScheduleController>();
            For<ISettingsController>().Use<SettingsController>();
            For<ITagController>().Use<TagController>();
        }
    }
}
